package com.yunshang.shoppingmall.mapper;

import com.yunshang.shoppingmall.entity.Role;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface RoleMapper {
    //删除角色
    int deleteByPrimaryKey(Integer roleId);
    //增加角色
    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer roleId);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    //根据用户ID删除角色
    int delByUserId(int userId);
    //查询用户角色
   List<Role> selectRoleByUserId(int userId);
   List<Role> selectList();

}